<%@ page contentType="text/html; charset=utf-8" language="java" import="java.util.*" pageEncoding="utf-8" errorPage="" %>
<%@ page import="com.club325.voicemicroblog.domain.*" %>
<%@ page import="java.text.*" %>
<%@ page session="false" %>

<%
	String tip = null;
	tip = (String)request.getAttribute("tip");

	PrivateInfo info = (PrivateInfo)request.getAttribute("privateInfo");
	if (info == null) {
		response.sendRedirect("/Microblog/pages/timeout.html");
    	return ;
	}
	
	String name = null;
	String sex = null;
	String birthday = null;
	String address = null;
	String email = null;
	String qq = null;
	String msn = null;
	
	name = info.getUserID();
	
	if (info.getMale()) {
		sex = "男";
	}
	else {
		sex = "女";
	}
		
	Date date = info.getBirthday();
	if (date != null)
	{
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
		birthday = df.format(date);
	}
		
	address = info.getAddress();
	email = info.getEmail();
	
	int tempQQ = info.getQQ();
	if (tempQQ == 0)
	{
		qq = "";
	}
	else
	{
		qq = String.valueOf(tempQQ);
	}
	msn = info.getMSN();
	
	if (name == null || name.equals("")) { name = "暂无信息"; }
	if (sex == null || sex.equals("")) { sex = "保密"; }
	if (birthday == null || birthday.equals("")) { birthday = "暂无信息"; }
	if (address == null || address.equals("")) { address = "暂无信息"; }
	if (email == null || email.equals("")) { email = "暂无信息"; }
	if (qq == null || qq.equals("")) { qq = "暂无信息"; }
	if (msn == null || msn.equals("")) { msn = "暂无信息"; }
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/frame.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Keywords" content="Microblog,Vioce,blog" />
<meta http-equiv="Description" content="Voice Microblog" />

<!-- InstanceBeginEditable name="doctitle" -->
<title>用户个人信息</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<link href="/Microblog/styles/user_account.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->
<link href="/Microblog/styles/global.css" rel="stylesheet" type="text/css" />
<link href="/Microblog/styles/blank.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="main">
<!-- InstanceBeginEditable name="EditRegion_main" -->
  <h1>用户个人信息...</h1>
  <h4><% if (tip == null) { %>点击修改按键, 可修改个人信息...<% } else { %> <%= tip %> <% } %></h4>
  <table width="500" border="0" cellspacing="10" cellpadding="0">
    <tr>
      <th width="130" scope="row">用户名 :</th>
      <td width="370"><%= name %></td>
    </tr>
    <tr>
      <th scope="row">性别 :</th>
      <td><%= sex %></td>
    </tr>
    <tr>
      <th scope="row">生日 :</th>
      <td><%= birthday %></td>
    </tr>
    <tr>
      <th scope="row">家庭地址 :</th>
      <td><%= address %></td>
    </tr>
    <tr>
      <th scope="row">email :</th>
      <td><%= email %></td>
    </tr>
    <tr>
      <th scope="row">QQ号 :</th>
      <td><%= qq %></td>
    </tr>
    <tr>
      <th scope="row">MSN帐号 :</th>
      <td><%= msn %></td>
    </tr>
  </table>
  <a href="/Microblog/pages/user_account_modify.jsp">修改个人信息</a>
  <div id="bottom"></div> <!-- InstanceEndEditable -->
</div>
</body>
<!-- InstanceEnd --></html>
